<div class="default-background">
    <h2 class="flex-row-space-between" style="margin-bottom: 0px;">{{'REVOKE_TOKEN_DASHBOARD' |translate}} </h2>
    <app-search (search)="doSearch($event)" [searchConfigs]="searchConfigs">
    </app-search>
    <div>
        <div class="table-container">
            <table mat-table [dataSource]="tableSource.dataSource">
                <ng-container matColumnDef="targetId">
                    <th mat-header-cell *matHeaderCellDef> {{columnList['targetId']|translate}}</th>
                    <td mat-cell *matCellDef="let row">
                        <app-copy-field [inputValue]="row.targetId"></app-copy-field>
                    </td>
                </ng-container>

                <ng-container matColumnDef="issuedAt">
                    <th mat-header-cell *matHeaderCellDef> {{columnList['issuedAt']|translate}}</th>
                    <td mat-cell *matCellDef="let row">
                        {{row.issuedAt*1000 | date:'short'}}
                    </td>
                </ng-container>

                <ng-container matColumnDef="type">
                    <th mat-header-cell *matHeaderCellDef> {{columnList['type']|translate}}</th>
                    <td mat-cell *matCellDef="let row">
                        <mat-chip>
                            {{'TARGET_'+row.type|translate}}
                        </mat-chip>
                    </td>
                </ng-container>

                <tr mat-header-row *matHeaderRowDef="tableSource.displayedColumns(); sticky: true"></tr>
                <tr mat-row *matRowDef="let row; columns: tableSource.displayedColumns();"></tr>
            </table>
        </div>

        <mat-paginator [showFirstLastButtons]="true" [length]="tableSource.totoalItemCount"
            [pageIndex]="tableSource.pageNum" [pageSize]="tableSource.pageSize"
            (page)="tableSource.loadPage($event.pageIndex)">
        </mat-paginator>
    </div>
</div>